import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

Vue.config.productionTip = false

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI, { size: 'mini' });

//css reset
import 'normalize.css/normalize.css' 

//api
import api from '@/api';
Vue.prototype.__api = api;

//全局注册组件
import regGlobalComponents from'./utils/regGlobalComponents.js';
Vue.use(regGlobalComponents)

//混入
import mixin from './mixins';
Vue.use(mixin)

//注册过滤器
import * as filters from './filters'
Object.keys(filters).forEach(key => {
	Vue.filter(key, filters[key])
})

//注册指令
import directives from './directive'
Vue.use(directives)

//样式文件
import '@css/app.less'

import dataV from '@jiaminghi/data-view'

Vue.use(dataV)

//event-bus
Vue.prototype.$eventBus = new Vue();

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
